/**
 * 测试用例模型
 *
 * Created by snowingsea on 2020/03/09.
 */
const mongoose = require('mongoose');
const schemaDefinition = require('./schema/test-case');
const schemaInstance = mongoose.Schema(schemaDefinition);
// 存储key中含有半角的点类型
schemaInstance.pre('save', (next, options) => {
  if (options) {
    options.checkKeys = false;
  }
  next();
});
const modelInstance = mongoose.model('test-case', schemaInstance);
/**
 * Export model definition object.
 */
module.exports = modelInstance;
